//
//  UpdateView.h
//  MQBrowser
//
//  Created by 巩小鹏 on 2016/12/22.
//  Copyright © 2016年 巩小鹏. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void(^CommitAction)(UIButton* commitBtn);
typedef void(^CancelAction)(UIButton* cancelBtn);


@class UpdateAppearance;
@interface UpdateView : UIView

+ (UpdateAppearance *)updateappearances;


@property (nonatomic,strong) UILabel * titleUpdateLable;//!<更新窗口头部
@property (nonatomic,strong) UILabel * bodyTitleLable;//!<内容Title
@property (nonatomic,strong) UIWebView * bodyContentView;//!<内容
@property (nonatomic,strong) UILabel * selectUpdateLable;//!<是否提醒更新
@property (nonatomic,strong) UIButton * selectUpdateBtn;//!<是否提醒更新按钮
@property (nonatomic,strong) UIButton * cancelUpdateBtn;//!<取消
@property (nonatomic,strong) UIButton * commitUpdateBtn;//!<确定

+ (void)gsWithTitle:(NSString*)title message:(NSString*)message maqueVersion:(NSString *)maqueVersion cancelButton:(NSString*)cancelTitle customButton:(NSString*)commitTitle cancelAction:(CancelAction)cancelAction commitAction:(CommitAction)commitAction;
+ (void)gsWithTitle:(NSString*)title message:(NSString*)message maqueVersion:(NSString *)maqueVersion customButton:(NSString*)commitTitle commitAction:(CommitAction)commitAction;

@end

@interface UIButton (gsblock)

@property (readonly) NSMutableDictionary *event;

- (void) handleControlEvent:(UIControlEvents)controlEvent withBlock:(CommitAction)action;
- (void) cancelControlEvent:(UIControlEvents)controlEvent withBlock:(CancelAction)action;
- (void)handleControlEvent:(UIControlEvents)event CancelBlock:(CancelAction)cancelblock withBlock:(CommitAction)block;
@end
